home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / biblio / bibtex / contrib / is-abbrv.bst < prev    next >
Text File  |  1994-05-29  |  27KB  |  1,468 lines

  1. %% =====================================================================
  2. %% WARNING: Do NOT edit this file.  It was produced automatically by
  3. %% Nelson H. F. Beebe <beebe@plot79.math.utah.edu>
  4. %% from /a/csc-sun/export/home/csc-sun/b/beebe/tex/bib/merge/xbtxbst.doc 
  5. %% on Mon May 30 18:09:30 MDT 1994
  6. %% =====================================================================
  7. %%%=====================================================================
  8. %%% @BibTeX-style-file{
  9. %%%     author          = "Nelson H. F. Beebe",
  10. %%%     version         = "1.05",
  11. %%%     date            = "30 May 1994",
  12. %%%     time            = "18:05:20 MDT",
  13. %%%     filename        = "is-abbrv.bst",
  14. %%%     address         = "Center for Scientific Computing
  15. %%%                        Department of Mathematics
  16. %%%                        University of Utah
  17. %%%                        Salt Lake City, UT 84112
  18. %%%                        USA",
  19. %%%     telephone       = "+1 801 581 5254",
  20. %%%     FAX             = "+1 801 581 4148",
  21. %%%     checksum        = "21132 1467 3272 26698",
  22. %%%     email           = "beebe@math.utah.edu (Internet)",
  23. %%%     codetable       = "ISO/ASCII",
  24. %%%     keywords        = "BibTeX, style, bibliography",
  25. %%%     supported       = "yes",
  26. %%%     docstring       = "This file is a modification of the standard
  27. %%%                        BibTeX btxbst.doc file, or is a .bst file
  28. %%%                        derived from that modification.  It contains
  29. %%%                        added support for ISBN and ISSN fields, as
  30. %%%                        well as for the PERIODICAL entry.  The UNIX C
  31. %%%                        preprocessor can be used to extract the
  32. %%%                        extensions of the standard styles, as
  33. %%%                        follows:
  34. %%%
  35. %%%                        cpp -P -DPLAIN xbtxbst.doc is-plain.txt
  36. %%%                        cpp -P -DUNSRT xbtxbst.doc is-unsrt.txt
  37. %%%                        cpp -P -DALPHA xbtxbst.doc is-alpha.txt
  38. %%%                        cpp -P -DABBRV xbtxbst.doc is-abbrv.txt
  39. %%%
  40. %%%                        Add -D_ISBN for ISBN output, -D_ISSN for
  41. %%%                        ISSN output, -D_LCCN for LCCN output,
  42. %%%                        -D_PRICE for price output, and -D_BOOKPAGES
  43. %%%                        for book and techreport pages output.
  44. %%%
  45. %%%                        Add -D_NUMERIC_SUFFIXES to get numeric
  46. %%%                        label suffixes -1, -2, ..., -26, instead of
  47. %%%                        letters a, b, ..., z, so as to correctly
  48. %%%                        handle alpha-style bibliographies with more
  49. %%%                        than 26 entries for a single author in one
  50. %%%                        year.  Change letter suffix code to switch
  51. %%%                        to numeric suffixes if more than 26 letters
  52. %%%                        are used, so that no matter which scheme is
  53. %%%                        selected, correct output will always be
  54. %%%                        obtained.
  55. %%%
  56. %%%                        If desired, a sed script can be used to
  57. %%%                        eliminate non-essential comments (this
  58. %%%                        reduces the file size by 2/3); a command
  59. %%%                        filter step like
  60. %%%                                sed -e '/^%$/d' -e '/^%[^%].*$/d'
  61. %%%                        will accomplish that job.
  62. %%%
  63. %%%                        The checksum field above contains a CRC-16
  64. %%%                        checksum as the first value, followed by the
  65. %%%                        equivalent of the standard UNIX wc (word
  66. %%%                        count) utility output of lines, words, and
  67. %%%                        characters.  This is produced by Robert
  68. %%%                        Solovay's checksum utility."
  69. %%%     }
  70. %%% ====================================================================
  71. %%% Revision history (reverse time order):
  72. %%% 1.05 [30-May-1994]
  73. %%%     Add NUMERIC_SUFFIXES support.
  74. %%%
  75. %%%     Change all preprocessor statements to put else and endif
  76. %%%     labels inside C-style comments to conform to 1989 ISO/ANSI C
  77. %%%     Standard.
  78. %%% 1.04 [11-Nov-1993]
  79. %%%     Add underscore prefix to new processor symbols to prevent
  80. %%%     substitution in comments
  81. %%% 1.03 [11-Oct-1993]
  82. %%%     Add support for LCCN (Library of Congress Catalog Number)
  83. %%%     and price fields, and make ISBN, ISSN, LCCN, and price
  84. %%%     selectable by preprocessor conditionals.
  85. %%% 1.02 [12-Sep-1991]
  86. %%%      Merge in Barbara N. Beeton's suggestion for hyphen-less
  87. %%%      line breaks around volume(number):page.
  88. %%% 1.01 [10-Sep-1991]
  89. %%%      Update file comment header and use Solovay checksum program.
  90. %%% 1.00 [17-Oct-1990]
  91. %%%      Original version merging hand-edits of is-xxx.bst files into
  92. %%%      this master file, xbtxbst.doc.
  93.  
  94.  
  95. %% BibTeX `plain' family
  96. %%       version 0.99b for BibTeX versions 0.99a or later, LaTeX version 2.09.
  97. %%       Copyright (C) 1985, all rights reserved.
  98. %%       Copying of this file is authorized only if either
  99. %%       (1) you make absolutely no changes to your copy, including name, or
  100. %%       (2) if you do make changes, you name it something other than
  101. %%       btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
  102. %%       This restriction helps ensure that all standard styles are identical.
  103. %%       The file btxbst.doc has the documentation for this style.
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121. ENTRY
  122.   { address
  123.     author
  124.     booktitle
  125.     chapter
  126.     edition
  127.     editor
  128.     howpublished
  129.     institution
  130.  
  131.     isbn
  132.  
  133.  
  134.     issn
  135.  
  136.     journal
  137.     key
  138.  
  139.     lccn
  140.  
  141.     month
  142.     note
  143.     number
  144.     organization
  145.     pages
  146.  
  147.     price
  148.  
  149.     publisher
  150.     school
  151.     series
  152.     title
  153.     type
  154.     volume
  155.     year
  156.   }
  157.   {}
  158.  
  159.   { label }
  160.  
  161.  
  162.  
  163. INTEGERS { output.state before.all mid.sentence after.sentence after.block }
  164.  
  165. FUNCTION {init.state.consts}
  166. { #0 'before.all :=
  167.   #1 'mid.sentence :=
  168.   #2 'after.sentence :=
  169.   #3 'after.block :=
  170. }
  171.  
  172.  
  173. STRINGS { s t }
  174.  
  175. FUNCTION {output.nonnull}
  176. { 's :=
  177.   output.state mid.sentence =
  178.     { ", " * write$ }
  179.     { output.state after.block =
  180.         { add.period$ write$
  181.           newline$
  182.           "\newblock " write$
  183.         }
  184.         { output.state before.all =
  185.             'write$
  186.             { add.period$ " " * write$ }
  187.           if$
  188.         }
  189.       if$
  190.       mid.sentence 'output.state :=
  191.     }
  192.   if$
  193.   s
  194. }
  195.  
  196. FUNCTION {output}
  197. { duplicate$ empty$
  198.     'pop$
  199.     'output.nonnull
  200.   if$
  201. }
  202.  
  203. FUNCTION {output.check}
  204. { 't :=
  205.   duplicate$ empty$
  206.     { pop$ "empty " t * " in " * cite$ * warning$ }
  207.     'output.nonnull
  208.   if$
  209. }
  210.  
  211. FUNCTION {output.bibitem}
  212. { newline$
  213.  
  214.   "\bibitem{" write$
  215.  
  216.   cite$ write$
  217.   "}" write$
  218.   newline$
  219.   ""
  220.   before.all 'output.state :=
  221. }
  222.  
  223.  
  224. FUNCTION {fin.entry}
  225. { add.period$
  226.   write$
  227.   newline$
  228. }
  229.  
  230. FUNCTION {new.block}
  231. { output.state before.all =
  232.     'skip$
  233.     { after.block 'output.state := }
  234.   if$
  235. }
  236.  
  237. FUNCTION {new.sentence}
  238. { output.state after.block =
  239.     'skip$
  240.     { output.state before.all =
  241.         'skip$
  242.         { after.sentence 'output.state := }
  243.       if$
  244.     }
  245.   if$
  246. }
  247.  
  248.  
  249. FUNCTION {not}
  250. {   { #0 }
  251.     { #1 }
  252.   if$
  253. }
  254.  
  255. FUNCTION {and}
  256. {   'skip$
  257.     { pop$ #0 }
  258.   if$
  259. }
  260.  
  261. FUNCTION {or}
  262. {   { pop$ #1 }
  263.     'skip$
  264.   if$
  265. }
  266.  
  267.  
  268. FUNCTION {new.block.checka}
  269. { empty$
  270.     'skip$
  271.     'new.block
  272.   if$
  273. }
  274.  
  275. FUNCTION {new.block.checkb}
  276. { empty$
  277.   swap$ empty$
  278.   and
  279.     'skip$
  280.     'new.block
  281.   if$
  282. }
  283.  
  284.  
  285. FUNCTION {new.sentence.checka}
  286. { empty$
  287.     'skip$
  288.     'new.sentence
  289.   if$
  290. }
  291.  
  292. FUNCTION {new.sentence.checkb}
  293. { empty$
  294.   swap$ empty$
  295.   and
  296.     'skip$
  297.     'new.sentence
  298.   if$
  299. }
  300.  
  301.  
  302. FUNCTION {field.or.null}
  303. { duplicate$ empty$
  304.     { pop$ "" }
  305.     'skip$
  306.   if$
  307. }
  308.  
  309. FUNCTION {emphasize}
  310. { duplicate$ empty$
  311.     { pop$ "" }
  312.     { "{\em " swap$ * "}" * }
  313.   if$
  314. }
  315.  
  316. INTEGERS { nameptr namesleft numnames }
  317.  
  318. FUNCTION {format.names}
  319. { 's :=
  320.   #1 'nameptr :=
  321.   s num.names$ 'numnames :=
  322.   numnames 'namesleft :=
  323.     { namesleft #0 > }
  324.  
  325.     { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
  326.  
  327.       nameptr #1 >
  328.         { namesleft #1 >
  329.             { ", " * t * }
  330.             { numnames #2 >
  331.                 { "," * }
  332.                 'skip$
  333.               if$
  334.               t "others" =
  335.                 { " et~al." * }
  336.                 { " and " * t * }
  337.               if$
  338.             }
  339.           if$
  340.         }
  341.         't
  342.       if$
  343.       nameptr #1 + 'nameptr :=
  344.       namesleft #1 - 'namesleft :=
  345.     }
  346.   while$
  347. }
  348.  
  349. FUNCTION {format.authors}
  350. { author empty$
  351.     { "" }
  352.     { author format.names }
  353.   if$
  354. }
  355.  
  356. FUNCTION {format.editors}
  357. { editor empty$
  358.     { "" }
  359.     { editor format.names
  360.       editor num.names$ #1 >
  361.         { ", editors" * }
  362.         { ", editor" * }
  363.       if$
  364.     }
  365.   if$
  366. }
  367.  
  368.  
  369. FUNCTION {format.isbn}
  370. { isbn empty$
  371.     { "" }
  372.     { new.block "ISBN " isbn * }
  373.   if$
  374. }
  375.  
  376.  
  377.  
  378. FUNCTION {format.issn}
  379. { issn empty$
  380.     { "" }
  381.     { new.block "ISSN " issn * }
  382.   if$
  383. }
  384.  
  385.  
  386.  
  387. FUNCTION {format.lccn}
  388. { lccn empty$
  389.     { "" }
  390.     { new.block "LCCN " lccn * }
  391.   if$
  392. }
  393.  
  394.  
  395.  
  396. FUNCTION {format.price}
  397. { price empty$
  398.     { "" }
  399.     { new.block " " price * }
  400.   if$
  401. }
  402.  
  403.  
  404.  
  405.  
  406.  
  407. FUNCTION {format.title}
  408. { title empty$
  409.     { "" }
  410.  
  411.     { title "t" change.case$ }
  412.  
  413.   if$
  414. }
  415.  
  416.  
  417.  
  418. FUNCTION {n.dashify}
  419. { 't :=
  420.   ""
  421.     { t empty$ not }
  422.     { t #1 #1 substring$ "-" =
  423.         { t #1 #2 substring$ "--" = not
  424.             { "--" *
  425.               t #2 global.max$ substring$ 't :=
  426.             }
  427.             {   { t #1 #1 substring$ "-" = }
  428.                 { "-" *
  429.                   t #2 global.max$ substring$ 't :=
  430.                 }
  431.               while$
  432.             }
  433.           if$
  434.         }
  435.         { t #1 #1 substring$ *
  436.           t #2 global.max$ substring$ 't :=
  437.         }
  438.       if$
  439.     }
  440.   while$
  441. }
  442.  
  443.  
  444. FUNCTION {format.date}
  445. { year empty$
  446.     { month empty$
  447.         { "" }
  448.         { "there's a month but no year in " cite$ * warning$
  449.           month
  450.         }
  451.       if$
  452.     }
  453.     { month empty$
  454.         'year
  455.         { month " " * year * }
  456.       if$
  457.     }
  458.   if$
  459. }
  460.  
  461.  
  462. FUNCTION {format.btitle}
  463. { title emphasize
  464. }
  465.  
  466.  
  467. FUNCTION {tie.or.space.connect}
  468. { duplicate$ text.length$ #3 <
  469.     { "~" }
  470.     { " " }
  471.   if$
  472.   swap$ * *
  473. }
  474.  
  475.  
  476. FUNCTION {either.or.check}
  477. { empty$
  478.     'pop$
  479.     { "can't use both " swap$ * " fields in " * cite$ * warning$ }
  480.   if$
  481. }
  482.  
  483.  
  484. FUNCTION {format.bvolume}
  485. { volume empty$
  486.     { "" }
  487.     { "volume" volume tie.or.space.connect
  488.       series empty$
  489.         'skip$
  490.         { " of " * series emphasize * }
  491.       if$
  492.       "volume and number" number either.or.check
  493.     }
  494.   if$
  495. }
  496.  
  497.  
  498. FUNCTION {format.number.series}
  499. { volume empty$
  500.     { number empty$
  501.         { series field.or.null }
  502.         { output.state mid.sentence =
  503.             { "number" }
  504.             { "Number" }
  505.           if$
  506.           number tie.or.space.connect
  507.           series empty$
  508.             { "there's a number but no series in " cite$ * warning$ }
  509.             { " in " * series * }
  510.           if$
  511.         }
  512.       if$
  513.     }
  514.     { "" }
  515.   if$
  516. }
  517.  
  518.  
  519. FUNCTION {format.edition}
  520. { edition empty$
  521.     { "" }
  522.     { output.state mid.sentence =
  523.         { edition "l" change.case$ " edition" * }
  524.         { edition "t" change.case$ " edition" * }
  525.       if$
  526.     }
  527.   if$
  528. }
  529.  
  530.  
  531. INTEGERS { multiresult }
  532.  
  533. FUNCTION {multi.page.check}
  534. { 't :=
  535.   #0 'multiresult :=
  536.     { multiresult not
  537.       t empty$ not
  538.       and
  539.     }
  540.     { t #1 #1 substring$
  541.       duplicate$ "-" =
  542.       swap$ duplicate$ "," =
  543.       swap$ "+" =
  544.       or or
  545.         { #1 'multiresult := }
  546.         { t #2 global.max$ substring$ 't := }
  547.       if$
  548.     }
  549.   while$
  550.   multiresult
  551. }
  552.  
  553.  
  554. FUNCTION {format.book.pages}
  555. { pages empty$
  556.     { "" }
  557.     { new.block pages " pp." * }
  558.   if$
  559. }
  560.  
  561.  
  562.  
  563. FUNCTION {format.pages}
  564. { pages empty$
  565.     { "" }
  566.     { pages multi.page.check
  567.         { "pages" pages n.dashify tie.or.space.connect }
  568.         { "page" pages tie.or.space.connect }
  569.       if$
  570.     }
  571.   if$
  572. }
  573.  
  574.  
  575. FUNCTION {format.vol.num.pages}
  576. { volume field.or.null
  577.   number empty$
  578.     'skip$
  579.     { "\penalty0 (" number * ")" * *
  580.       volume empty$
  581.         { "there's a number but no volume in " cite$ * warning$ }
  582.         'skip$
  583.       if$
  584.     }
  585.   if$
  586.   pages empty$
  587.     'skip$
  588.     { duplicate$ empty$
  589.         { pop$ format.pages }
  590.         { ":\penalty0 " * pages n.dashify * }
  591.       if$
  592.     }
  593.   if$
  594. }
  595.  
  596.  
  597.  
  598. FUNCTION {format.chapter.pages}
  599. { chapter empty$
  600.     'format.pages
  601.     { type empty$
  602.         { "chapter" }
  603.         { type "l" change.case$ }
  604.       if$
  605.       chapter tie.or.space.connect
  606.       pages empty$
  607.         'skip$
  608.         { ", " * format.pages * }
  609.       if$
  610.     }
  611.   if$
  612. }
  613.  
  614.  
  615. FUNCTION {format.in.ed.booktitle}
  616. { booktitle empty$
  617.     { "" }
  618.     { editor empty$
  619.         { "In " booktitle emphasize * }
  620.         { "In " format.editors * ", " * booktitle emphasize * }
  621.       if$
  622.     }
  623.   if$
  624. }
  625.  
  626.  
  627. FUNCTION {empty.misc.check}
  628. { author empty$ title empty$ howpublished empty$
  629.   month empty$ year empty$ note empty$
  630.   and and and and and
  631.  
  632.   key empty$ not and
  633.  
  634.     { "all relevant fields are empty in " cite$ * warning$ }
  635.     'skip$
  636.   if$
  637. }
  638.  
  639.  
  640. FUNCTION {format.thesis.type}
  641. { type empty$
  642.     'skip$
  643.     { pop$
  644.       type "t" change.case$
  645.     }
  646.   if$
  647. }
  648.  
  649.  
  650. FUNCTION {format.tr.number}
  651. { type empty$
  652.     { "Technical Report" }
  653.     'type
  654.   if$
  655.   number empty$
  656.     { "t" change.case$ }
  657.     { number tie.or.space.connect }
  658.   if$
  659. }
  660.  
  661.  
  662. FUNCTION {format.article.crossref}
  663. { key empty$
  664.     { journal empty$
  665.         { "need key or journal for " cite$ * " to crossref " * crossref *
  666.           warning$
  667.           ""
  668.         }
  669.         { "In {\em " journal * "\/}" * }
  670.       if$
  671.     }
  672.     { "In " key * }
  673.   if$
  674.   " \cite{" * crossref * "}" *
  675. }
  676.  
  677.  
  678. FUNCTION {format.crossref.editor}
  679. { editor #1 "{vv~}{ll}" format.name$
  680.   editor num.names$ duplicate$
  681.   #2 >
  682.     { pop$ " et~al." * }
  683.     { #2 <
  684.         'skip$
  685.         { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
  686.             { " et~al." * }
  687.             { " and " * editor #2 "{vv~}{ll}" format.name$ * }
  688.           if$
  689.         }
  690.       if$
  691.     }
  692.   if$
  693. }
  694.  
  695.  
  696. FUNCTION {format.book.crossref}
  697. { volume empty$
  698.     { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
  699.       "In "
  700.     }
  701.     { "Volume" volume tie.or.space.connect
  702.       " of " *
  703.     }
  704.   if$
  705.   editor empty$
  706.   editor field.or.null author field.or.null =
  707.   or
  708.     { key empty$
  709.         { series empty$
  710.             { "need editor, key, or series for " cite$ * " to crossref " *
  711.               crossref * warning$
  712.               "" *
  713.             }
  714.             { "{\em " * series * "\/}" * }
  715.           if$
  716.         }
  717.         { key * }
  718.       if$
  719.     }
  720.     { format.crossref.editor * }
  721.   if$
  722.   " \cite{" * crossref * "}" *
  723. }
  724.  
  725.  
  726. FUNCTION {format.incoll.inproc.crossref}
  727. { editor empty$
  728.   editor field.or.null author field.or.null =
  729.   or
  730.     { key empty$
  731.         { booktitle empty$
  732.             { "need editor, key, or booktitle for " cite$ * " to crossref " *
  733.               crossref * warning$
  734.               ""
  735.             }
  736.             { "In {\em " booktitle * "\/}" * }
  737.           if$
  738.         }
  739.         { "In " key * }
  740.       if$
  741.     }
  742.     { "In " format.crossref.editor * }
  743.   if$
  744.   " \cite{" * crossref * "}" *
  745. }
  746.  
  747.  
  748. FUNCTION {article}
  749. { output.bibitem
  750.   format.authors "author" output.check
  751.   new.block
  752.   format.title "title" output.check
  753.   new.block
  754.   crossref missing$
  755.     { journal emphasize "journal" output.check
  756.       format.vol.num.pages output
  757.       format.date "year" output.check
  758.     }
  759.     { format.article.crossref output.nonnull
  760.       format.pages output
  761.     }
  762.   if$
  763.   new.block
  764.   note output
  765.   fin.entry
  766. }
  767.  
  768. FUNCTION {book}
  769. { output.bibitem
  770.   author empty$
  771.     { format.editors "author and editor" output.check }
  772.     { format.authors output.nonnull
  773.       crossref missing$
  774.         { "author and editor" editor either.or.check }
  775.         'skip$
  776.       if$
  777.     }
  778.   if$
  779.   new.block
  780.   format.btitle "title" output.check
  781.   crossref missing$
  782.     { format.bvolume output
  783.       new.block
  784.       format.number.series output
  785.       new.sentence
  786.       publisher "publisher" output.check
  787.       address output
  788.     }
  789.     { new.block
  790.       format.book.crossref output.nonnull
  791.     }
  792.   if$
  793.   format.edition output
  794.   format.date "year" output.check
  795.  
  796.   format.isbn output
  797.  
  798.  
  799.   format.book.pages output
  800.  
  801.  
  802.   format.lccn output
  803.  
  804.  
  805.   format.price output
  806.  
  807.   new.block
  808.   note output
  809.   fin.entry
  810. }
  811.  
  812.  
  813. FUNCTION {booklet}
  814. { output.bibitem
  815.   format.authors output
  816.   new.block
  817.   format.title "title" output.check
  818.   howpublished address new.block.checkb
  819.   howpublished output
  820.   address output
  821.   format.date output
  822.  
  823.   format.isbn output
  824.  
  825.  
  826.   format.book.pages output
  827.  
  828.  
  829.   format.lccn output
  830.  
  831.  
  832.   format.price output
  833.  
  834.   new.block
  835.   note output
  836.   fin.entry
  837. }
  838.  
  839.  
  840.  
  841. FUNCTION {inbook}
  842. { output.bibitem
  843.   author empty$
  844.     { format.editors "author and editor" output.check }
  845.     { format.authors output.nonnull
  846.       crossref missing$
  847.         { "author and editor" editor either.or.check }
  848.         'skip$
  849.       if$
  850.     }
  851.   if$
  852.   new.block
  853.   format.btitle "title" output.check
  854.   crossref missing$
  855.     { format.bvolume output
  856.       format.chapter.pages "chapter and pages" output.check
  857.       new.block
  858.       format.number.series output
  859.       new.sentence
  860.       publisher "publisher" output.check
  861.       address output
  862.     }
  863.     { format.chapter.pages "chapter and pages" output.check
  864.       new.block
  865.       format.book.crossref output.nonnull
  866.     }
  867.   if$
  868.   format.edition output
  869.   format.date "year" output.check
  870.  
  871.   format.isbn output
  872.  
  873.  
  874.   format.lccn output
  875.  
  876.  
  877.   format.price output
  878.  
  879.   new.block
  880.   note output
  881.   fin.entry
  882. }
  883.  
  884.  
  885. FUNCTION {incollection}
  886. { output.bibitem
  887.   format.authors "author" output.check
  888.   new.block
  889.   format.title "title" output.check
  890.   new.block
  891.   crossref missing$
  892.     { format.in.ed.booktitle "booktitle" output.check
  893.       format.bvolume output
  894.       format.number.series output
  895.       format.chapter.pages output
  896.       new.sentence
  897.       publisher "publisher" output.check
  898.       address output
  899.       format.edition output
  900.       format.date "year" output.check
  901.     }
  902.     { format.incoll.inproc.crossref output.nonnull
  903.       format.chapter.pages output
  904.     }
  905.   if$
  906.  
  907.   format.isbn output
  908.  
  909.  
  910.   format.lccn output
  911.  
  912.  
  913.   format.price output
  914.  
  915.   new.block
  916.   note output
  917.   fin.entry
  918. }
  919.  
  920.  
  921. FUNCTION {inproceedings}
  922. { output.bibitem
  923.   format.authors "author" output.check
  924.   new.block
  925.   format.title "title" output.check
  926.   new.block
  927.   crossref missing$
  928.     { format.in.ed.booktitle "booktitle" output.check
  929.       format.bvolume output
  930.       format.number.series output
  931.       format.pages output
  932.       address empty$
  933.         { organization publisher new.sentence.checkb
  934.           organization output
  935.           publisher output
  936.           format.date "year" output.check
  937.         }
  938.         { address output.nonnull
  939.           format.date "year" output.check
  940.           new.sentence
  941.           organization output
  942.           publisher output
  943.         }
  944.       if$
  945.     }
  946.     { format.incoll.inproc.crossref output.nonnull
  947.       format.pages output
  948.     }
  949.   if$
  950.  
  951.   format.isbn output
  952.  
  953.  
  954.   format.lccn output
  955.  
  956.  
  957.   format.price output
  958.  
  959.   new.block
  960.   note output
  961.   fin.entry
  962. }
  963.  
  964.  
  965. FUNCTION {conference} { inproceedings }
  966.  
  967.  
  968. FUNCTION {manual}
  969. { output.bibitem
  970.   author empty$
  971.     { organization empty$
  972.         'skip$
  973.         { organization output.nonnull
  974.           address output
  975.         }
  976.       if$
  977.     }
  978.     { format.authors output.nonnull }
  979.   if$
  980.   new.block
  981.   format.btitle "title" output.check
  982.   author empty$
  983.     { organization empty$
  984.         { address new.block.checka
  985.           address output
  986.         }
  987.         'skip$
  988.       if$
  989.     }
  990.     { organization address new.block.checkb
  991.       organization output
  992.       address output
  993.     }
  994.   if$
  995.   format.edition output
  996.   format.date output
  997.  
  998.   format.price output
  999.  
  1000.   new.block
  1001.   note output
  1002.   fin.entry
  1003. }
  1004.  
  1005.  
  1006. FUNCTION {mastersthesis}
  1007. { output.bibitem
  1008.   format.authors "author" output.check
  1009.   new.block
  1010.   format.title "title" output.check
  1011.   new.block
  1012.   "Master's thesis" format.thesis.type output.nonnull
  1013.   school "school" output.check
  1014.   address output
  1015.   format.date "year" output.check
  1016.   new.block
  1017.   note output
  1018.   fin.entry
  1019. }
  1020.  
  1021.  
  1022. FUNCTION {misc}
  1023. { output.bibitem
  1024.   format.authors output
  1025.   title howpublished new.block.checkb
  1026.   format.title output
  1027.   howpublished new.block.checka
  1028.   howpublished output
  1029.   format.date output
  1030.  
  1031.   format.issn output
  1032.  
  1033.  
  1034.   format.price output
  1035.  
  1036.   new.block
  1037.   note output
  1038.   fin.entry
  1039.   empty.misc.check
  1040. }
  1041.  
  1042.  
  1043. FUNCTION {phdthesis}
  1044. { output.bibitem
  1045.   format.authors "author" output.check
  1046.   new.block
  1047.   format.btitle "title" output.check
  1048.   new.block
  1049.   "PhD thesis" format.thesis.type output.nonnull
  1050.   school "school" output.check
  1051.   address output
  1052.   format.date "year" output.check
  1053.   new.block
  1054.   note output
  1055.   fin.entry
  1056. }
  1057.  
  1058.  
  1059. FUNCTION {periodical}
  1060. { output.bibitem
  1061.   editor empty$
  1062.     { organization output }
  1063.     { format.editors output.nonnull }
  1064.   if$
  1065.   new.block
  1066.   title emphasize "title" output.check
  1067.   format.vol.num.pages output
  1068.   format.date output
  1069.  
  1070.   format.issn output
  1071.  
  1072.  
  1073.   format.price output
  1074.  
  1075.   new.sentence
  1076.   publisher output
  1077.   address output
  1078.   howpublished new.block.checka
  1079.   howpublished output
  1080.   new.block
  1081.   note output
  1082.   fin.entry
  1083. }
  1084.  
  1085.  
  1086. FUNCTION {proceedings}
  1087. { output.bibitem
  1088.   editor empty$
  1089.     { organization output }
  1090.     { format.editors output.nonnull }
  1091.   if$
  1092.   new.block
  1093.   format.btitle "title" output.check
  1094.   format.bvolume output
  1095.   format.number.series output
  1096.   address empty$
  1097.     { editor empty$
  1098.         { publisher new.sentence.checka }
  1099.         { organization publisher new.sentence.checkb
  1100.           organization output
  1101.         }
  1102.       if$
  1103.       publisher output
  1104.       format.date "year" output.check
  1105.     }
  1106.     { address output.nonnull
  1107.       format.date "year" output.check
  1108.       new.sentence
  1109.       editor empty$
  1110.         'skip$
  1111.         { organization output }
  1112.       if$
  1113.       publisher output
  1114.     }
  1115.   if$
  1116.  
  1117.   format.isbn output
  1118.  
  1119.  
  1120.   format.lccn output
  1121.  
  1122.  
  1123.   format.price output
  1124.  
  1125.   new.block
  1126.   note output
  1127.   fin.entry
  1128. }
  1129.  
  1130.  
  1131. FUNCTION {techreport}
  1132. { output.bibitem
  1133.   format.authors "author" output.check
  1134.   new.block
  1135.   format.title "title" output.check
  1136.   new.block
  1137.   format.tr.number output.nonnull
  1138.   institution "institution" output.check
  1139.   address output
  1140.   format.date "year" output.check
  1141.  
  1142.   format.book.pages output
  1143.  
  1144.  
  1145.   format.price output
  1146.  
  1147.   new.block
  1148.   note output
  1149.   fin.entry
  1150. }
  1151.  
  1152.  
  1153. FUNCTION {unpublished}
  1154. { output.bibitem
  1155.   format.authors "author" output.check
  1156.   new.block
  1157.   format.title "title" output.check
  1158.   new.block
  1159.   note "note" output.check
  1160.   format.date output
  1161.   fin.entry
  1162. }
  1163.  
  1164.  
  1165. FUNCTION {default.type} { misc }
  1166.  
  1167.  
  1168.  
  1169.  
  1170. MACRO {jan} {"Jan."}
  1171.  
  1172. MACRO {feb} {"Feb."}
  1173.  
  1174. MACRO {mar} {"Mar."}
  1175.  
  1176. MACRO {apr} {"Apr."}
  1177.  
  1178. MACRO {may} {"May"}
  1179.  
  1180. MACRO {jun} {"June"}
  1181.  
  1182. MACRO {jul} {"July"}
  1183.  
  1184. MACRO {aug} {"Aug."}
  1185.  
  1186. MACRO {sep} {"Sept."}
  1187.  
  1188. MACRO {oct} {"Oct."}
  1189.  
  1190. MACRO {nov} {"Nov."}
  1191.  
  1192. MACRO {dec} {"Dec."}
  1193.  
  1194.  
  1195.  
  1196.  
  1197.  
  1198.  
  1199. MACRO {acmcs} {"ACM Comput. Surv."}
  1200.  
  1201. MACRO {acta} {"Acta Inf."}
  1202.  
  1203. MACRO {cacm} {"Commun. ACM"}
  1204.  
  1205. MACRO {ibmjrd} {"IBM J. Res. Dev."}
  1206.  
  1207. MACRO {ibmsj} {"IBM Syst.~J."}
  1208.  
  1209. MACRO {ieeese} {"IEEE Trans. Softw. Eng."}
  1210.  
  1211. MACRO {ieeetc} {"IEEE Trans. Comput."}
  1212.  
  1213. MACRO {ieeetcad}
  1214.  {"IEEE Trans. Comput.-Aided Design Integrated Circuits"}
  1215.  
  1216. MACRO {ipl} {"Inf. Process. Lett."}
  1217.  
  1218. MACRO {jacm} {"J.~ACM"}
  1219.  
  1220. MACRO {jcss} {"J.~Comput. Syst. Sci."}
  1221.  
  1222. MACRO {scp} {"Sci. Comput. Programming"}
  1223.  
  1224. MACRO {sicomp} {"SIAM J. Comput."}
  1225.  
  1226. MACRO {tocs} {"ACM Trans. Comput. Syst."}
  1227.  
  1228. MACRO {tods} {"ACM Trans. Database Syst."}
  1229.  
  1230. MACRO {tog} {"ACM Trans. Gr."}
  1231.  
  1232. MACRO {toms} {"ACM Trans. Math. Softw."}
  1233.  
  1234. MACRO {toois} {"ACM Trans. Office Inf. Syst."}
  1235.  
  1236. MACRO {toplas} {"ACM Trans. Prog. Lang. Syst."}
  1237.  
  1238. MACRO {tcs} {"Theoretical Comput. Sci."}
  1239.  
  1240.  
  1241.  
  1242.  
  1243. READ
  1244.  
  1245.  
  1246.  
  1247.  
  1248. FUNCTION {sortify}
  1249. { purify$
  1250.   "l" change.case$
  1251. }
  1252.  
  1253. INTEGERS { len }
  1254.  
  1255. FUNCTION {chop.word}
  1256. { 's :=
  1257.   'len :=
  1258.   s #1 len substring$ =
  1259.     { s len #1 + global.max$ substring$ }
  1260.     's
  1261.   if$
  1262. }
  1263.  
  1264.  
  1265.  
  1266.  
  1267.  
  1268.  
  1269.  
  1270.  
  1271.  
  1272. FUNCTION {sort.format.names}
  1273. { 's :=
  1274.   #1 'nameptr :=
  1275.   ""
  1276.   s num.names$ 'numnames :=
  1277.   numnames 'namesleft :=
  1278.     { namesleft #0 > }
  1279.     { nameptr #1 >
  1280.         { "   " * }
  1281.         'skip$
  1282.       if$
  1283.  
  1284.       s nameptr "{vv{ } }{ll{ }}{  f{ }}{  jj{ }}" format.name$ 't :=
  1285.  
  1286.       nameptr numnames = t "others" = and
  1287.         { "et al" * }
  1288.         { t sortify * }
  1289.       if$
  1290.       nameptr #1 + 'nameptr :=
  1291.       namesleft #1 - 'namesleft :=
  1292.     }
  1293.   while$
  1294. }
  1295.  
  1296.  
  1297. FUNCTION {sort.format.title}
  1298. { 't :=
  1299.   "A " #2
  1300.     "An " #3
  1301.       "The " #4 t chop.word
  1302.     chop.word
  1303.   chop.word
  1304.   sortify
  1305.   #1 global.max$ substring$
  1306. }
  1307.  
  1308.  
  1309. FUNCTION {author.sort}
  1310. { author empty$
  1311.     { key empty$
  1312.         { "to sort, need author or key in " cite$ * warning$
  1313.           ""
  1314.         }
  1315.         { key sortify }
  1316.       if$
  1317.     }
  1318.     { author sort.format.names }
  1319.   if$
  1320. }
  1321.  
  1322. FUNCTION {author.editor.sort}
  1323. { author empty$
  1324.     { editor empty$
  1325.         { key empty$
  1326.             { "to sort, need author, editor, or key in " cite$ * warning$
  1327.               ""
  1328.             }
  1329.             { key sortify }
  1330.           if$
  1331.         }
  1332.         { editor sort.format.names }
  1333.       if$
  1334.     }
  1335.     { author sort.format.names }
  1336.   if$
  1337. }
  1338.  
  1339. FUNCTION {author.organization.sort}
  1340. { author empty$
  1341.     { organization empty$
  1342.         { key empty$
  1343.             { "to sort, need author, organization, or key in " cite$ * warning$
  1344.               ""
  1345.             }
  1346.             { key sortify }
  1347.           if$
  1348.         }
  1349.         { "The " #4 organization chop.word sortify }
  1350.       if$
  1351.     }
  1352.     { author sort.format.names }
  1353.   if$
  1354. }
  1355.  
  1356. FUNCTION {editor.organization.sort}
  1357. { editor empty$
  1358.     { organization empty$
  1359.         { key empty$
  1360.             { "to sort, need editor, organization, or key in " cite$ * warning$
  1361.               ""
  1362.             }
  1363.             { key sortify }
  1364.           if$
  1365.         }
  1366.         { "The " #4 organization chop.word sortify }
  1367.       if$
  1368.     }
  1369.     { editor sort.format.names }
  1370.   if$
  1371. }
  1372.  
  1373.  
  1374. FUNCTION {presort}
  1375.  
  1376. { type$ "book" =
  1377.  
  1378.   type$ "inbook" =
  1379.   or
  1380.     'author.editor.sort
  1381.     { type$ "proceedings" =
  1382.         'editor.organization.sort
  1383.         { type$ "manual" =
  1384.             'author.organization.sort
  1385.             'author.sort
  1386.           if$
  1387.         }
  1388.       if$
  1389.     }
  1390.   if$
  1391.  
  1392.   "    "
  1393.   *
  1394.   year field.or.null sortify
  1395.   *
  1396.   "    "
  1397.   *
  1398.   title field.or.null
  1399.   sort.format.title
  1400.   *
  1401.   #1 entry.max$ substring$
  1402.   'sort.key$ :=
  1403. }
  1404.  
  1405. ITERATE {presort}
  1406.  
  1407.  
  1408. SORT
  1409.  
  1410.  
  1411.  
  1412.  
  1413.  
  1414.  
  1415.  
  1416. STRINGS { longest.label }
  1417.  
  1418. INTEGERS { number.label longest.label.width }
  1419.  
  1420. FUNCTION {initialize.longest.label}
  1421. { "" 'longest.label :=
  1422.   #1 'number.label :=
  1423.   #0 'longest.label.width :=
  1424. }
  1425.  
  1426. FUNCTION {longest.label.pass}
  1427. { number.label int.to.str$ 'label :=
  1428.   number.label #1 + 'number.label :=
  1429.   label width$ longest.label.width >
  1430.     { label 'longest.label :=
  1431.       label width$ 'longest.label.width :=
  1432.     }
  1433.     'skip$
  1434.   if$
  1435. }
  1436.  
  1437. EXECUTE {initialize.longest.label}
  1438.  
  1439. ITERATE {longest.label.pass}
  1440.  
  1441.  
  1442.  
  1443.  
  1444. FUNCTION {begin.bib}
  1445.  
  1446. { preamble$ empty$
  1447.  
  1448.     'skip$
  1449.     { preamble$ write$ newline$ }
  1450.   if$
  1451.   "\begin{thebibliography}{"  longest.label  * "}" * write$ newline$
  1452. }
  1453.  
  1454. EXECUTE {begin.bib}
  1455.  
  1456. EXECUTE {init.state.consts}
  1457.  
  1458.  
  1459. ITERATE {call.type$}
  1460.  
  1461.  
  1462. FUNCTION {end.bib}
  1463. { newline$
  1464.   "\end{thebibliography}" write$ newline$
  1465. }
  1466.  
  1467. EXECUTE {end.bib}
  1468.